package com.example.demo.mapper;

import com.example.demo.entity.User;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface UserMapper {
    List<User> selectAll();

    @Select("select * from `user` where user_id = #{userId}")
    User selectById(Long userId);

    void insert(User user);

    void updateById(User user);

    @Delete("delete from `user` where user_id = #{userId}")
    void deletById(Long userId);
}